﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Xml;
using System.Data.OleDb;

namespace MikroMagazaObject
{
    public class CashProcess
    {
        public string Path { get; set; }
        Dictionary<int, int> lastPoint = new Dictionary<int, int>();
        Dictionary<string, Urun> _urunler = new Dictionary<string, Urun>();

        public string MagazaNo { get; set; }
        public string CnnString { get; set; }
        public string KdvSiralamasi { get; set; }
        private string ConvertDate(DateTime tarih)
        {
            return string.Format("{0}/{1}/{2} {3}:{4}:{5}", tarih.Day, tarih.Month, tarih.Year, tarih.Hour, tarih.Minute, tarih.Second);
        }

        private int GetKdvOran(int kdvSira)
        {
            string[] kdv = this.KdvSiralamasi.Split(',');
            if (kdvSira <= kdv.Length)
            {
                return Cevir.Parse<int>(kdv[kdvSira - 1]);
            }
            else
            {
                return 0;
            }
        }
        private void LoadStocks()
        {
            using (OleDbConnection cn = new OleDbConnection(CnnString))
            {
                cn.Open();
                using (OleDbCommand cmd = new OleDbCommand("SELECT TBL_STOK.stokid, TBL_BARKOD.barkod, TBL_STOK.stokkod, TBL_STOK.stokad, TBL_STOK.perakendekdv  FROM TBL_STOK INNER JOIN TBL_BARKOD ON TBL_STOK.stokid = TBL_BARKOD.stokid", cn))
                {
                    OleDbDataReader rd = cmd.ExecuteReader();
                    while (rd.Read())
                    {
                        if (!_urunler.ContainsKey(rd.GetString(1)))
                        {
                            _urunler.Add(rd.GetString(1), new Urun()
                            {
                                Adi = rd.GetString(3),
                                Kodu = rd.GetString(2),
                                StokId = rd.GetInt32(0),
                                VergiOrani = rd.GetInt32(4)
                            });
                        }
                    }
                    rd.Close();
                }
                cn.Close();
            }
        }
        public List<Urun> Stocks()
        {
            List<Urun> urunler = new List<Urun>();
            using (OleDbConnection cn = new OleDbConnection(CnnString))
            {
                cn.Open();
                using (OleDbCommand cmd = new OleDbCommand("SELECT TBL_STOK.stokid, TBL_BARKOD.barkod, TBL_STOK.stokkod, TBL_STOK.stokad, TBL_STOK.perakendekdv,TBL_STOK.anagrupad,TBL_STOK.altgrupkod,TBL_STOK.reyonad  FROM TBL_STOK INNER JOIN TBL_BARKOD ON TBL_STOK.stokid = TBL_BARKOD.stokid", cn))
                {
                    OleDbDataReader rd = cmd.ExecuteReader();
                    while (rd.Read())
                    {
                        urunler.Add(new Urun()
                        {
                            Adi = rd.GetString(3),
                            Kodu = rd.GetString(2),
                            StokId = rd.GetInt32(0),
                            VergiOrani = rd.GetInt32(4),
                            Barkod = rd.GetString(1),
                            AnaGrupAdi = rd.GetString(5),
                            AltGrupAdi = rd.GetString(6),
                            ReyonAdi = rd.GetString(7)
                        });
                    }
                    rd.Close();
                }
                cn.Close();
            }
            return urunler;
        }

        public void CreateReport(DateTime tarih)
        {
            LastReadPoint();
            string[] files = Directory.GetFiles(this.Path.Replace("POSGENEL", "POSKON"), "XRAPORU.*", SearchOption.TopDirectoryOnly);
            Dictionary<string, ZReport> _reports = new Dictionary<string, ZReport>();

            foreach (string file in files)
            {
                ZReport rpr = new ZReport();

                rpr.KasaNo = Cevir.Parse<int>(ZeroRemoveStart(file.Substring(file.IndexOf('.') + 1)));

                using (StreamReader sr = new StreamReader(file, System.Text.Encoding.GetEncoding("ibm857")))
                {
                    string line = string.Empty;
                    while (sr.Peek() > -1)
                    {
                        line = sr.ReadLine();

                        if (line.IndexOf("KÜMÜLATiF FiŞ CiROSU") > -1)
                        {
                            rpr.FisCirosu = Cevir.Parse<decimal>(isnullSetZero(line.Split('*')[1]));
                        }
                        else if (line.IndexOf("KESiLEN SATIŞ FiŞi ADEDi") > -1)
                        {
                            rpr.FisSayisi = Cevir.Parse<int>(isnullSetZero(line.Split('*')[1]));
                        }
                        else if (line.IndexOf("iPTAL EDiLEN FiŞ ADEDi") > -1)
                        {
                            rpr.IptalFisSayisi = Cevir.Parse<int>(isnullSetZero(line.Split('*')[1]));
                        }
                        else if (line.IndexOf("iPTAL EDiLEN FiŞ TUTARI") > -1)
                        {
                            rpr.IptalFisTutari = Cevir.Parse<decimal>(isnullSetZero(line.Split('*')[1]));
                        }
                        else if (line.IndexOf("FiŞ NAKiT TOPLAMI") > -1)
                        {
                            rpr.FisNakitToplami = Cevir.Parse<decimal>(isnullSetZero(line.Split('*')[1]));
                        }
                        //    else if (line.IndexOf("FATURA ADEDİ") > -1)
                        //    {
                        //        rpr.VOIDED_INVOICE_COUNT = isnullSetZero(line.Split('*')[1]);
                        //    }
                        //    else if (line.IndexOf("FATURALI SATIŞ:") > -1)
                        //    {
                        //        line = sr.ReadLine();
                        //        rpr.INVOICE_COUNT = isnullSetZero(line.Split('*')[1]);//BELGE ADEDİ
                        //        line = sr.ReadLine();
                        //        rpr.INVOICE_TOTAL = isnullSetZero(line.Split('*')[1]);//CİROSU
                        //        line = sr.ReadLine();
                        //        rpr.INVOICE_VAT_TOTAL = isnullSetZero(line.Split('*')[1]);//KDV TUTARI
                        //    }
                        //    else if (line.IndexOf("İNDİRİMLER TOPLAMI") > -1)
                        //    {
                        //        rpr.INVOICE_COUNT = isnullSetZero(line.Split('*')[1]);
                        //    }
                        //    else if (line.IndexOf("İNDİRİMLER TOPLAMI") > -1)
                        //    {
                        //        rpr.DISCOUNT_TOTAL = isnullSetZero(line.Split('*')[1]);
                        //    }
                        //    else if (line.IndexOf("FİŞ SATIR İPTALLERİ TUTARI") > -1)
                        //    {
                        //        rpr.IptalTutari = isnullSetZero(line.Split('*')[1]);
                        //    }
                        //    else if (line.IndexOf("GİDER PUSULASI") > -1)
                        //    {
                        //        rpr.IptalBelgeAdedi = isnullSetZero(line.Split('*')[1]);
                        //    }
                        //    else if (line.IndexOf("FATURA TUTARI") > -1)
                        //    {
                        //        rpr.VOIDED_INVOICE_TOTAL = isnullSetZero(line.Split('*')[1]);
                        //    }
                        //    else if (line.IndexOf("İRSALİYE:") > -1)
                        //    {
                        //        line = sr.ReadLine();
                        //        rpr.WAYBILL_COUNT = isnullSetZero(line.Split('*')[1]);//BELGE ADEDİ
                        //        rpr.VALID_WAYBILL_COUNT = isnullSetZero(line.Split('*')[1]);//BELGE ADEDİ
                        //        line = sr.ReadLine();
                        //        rpr.WAYBILL_TOTAL = isnullSetZero(line.Split('*')[1]);//CİROSU
                        //        line = sr.ReadLine();
                        //        rpr.WAYBILL_VAT_TOTAL = isnullSetZero(line.Split('*')[1]);//KDV TUTARI
                        //    }
                        //    else if (line.IndexOf("GİDER PUSULASI:") > -1)
                        //    {
                        //        line = sr.ReadLine();
                        //        rpr.RETURN_COUNT = isnullSetZero(line.Split('*')[1]);//BELGE ADEDİ
                        //        rpr.VALID_RETURN_COUNT = isnullSetZero(line.Split('*')[1]);//BELGE ADEDİ
                        //        line = sr.ReadLine();
                        //        rpr.RETURN_TOTAL = isnullSetZero(line.Split('*')[1]);//CİROSU
                        //        line = sr.ReadLine();
                        //        rpr.RETURN_VAT_TOTAL = isnullSetZero(line.Split('*')[1]);//KDV TUTARI
                        //    }
                        //    else if (line.IndexOf("İPTAL EDİLEN İRSALİYE") > -1)
                        //    {
                        //        line = sr.ReadLine();
                        //        rpr.VOIDED_WAYBILL_COUNT = isnullSetZero(line.Split('*')[1]);
                        //        line = sr.ReadLine();
                        //        rpr.VOIDED_WAYBILL_TOTAL = isnullSetZero(line.Split('*')[1]);
                        //    }
                        //    else if (line.IndexOf("İPTAL EDİLEN GİDER PUSULASI") > -1)
                        //    {
                        //        line = sr.ReadLine();
                        //        rpr.VOIDED_RETURN_COUNT = isnullSetZero(line.Split('*')[1]);
                        //        line = sr.ReadLine();
                        //        rpr.VOIDED_RETURN_TOTAL = isnullSetZero(line.Split('*')[1]);
                        //    }
                        //}
                        sr.Close();
                    }
                }
            }
        }
        public List<Main> ImportData(DateTime startDate, DateTime endDate)
        {
            LoadStocks();
            List<Main> Lines = new List<Main>();
            string[] files = getFileName(startDate, endDate);
            foreach (string file in files)
            {
                if (File.Exists(file))
                {
                    using (StreamReader sr = new StreamReader(file))
                    {
                        string satir = string.Empty;
                        string flag = string.Empty;
                        Main Line = null;
                        while (sr.Peek() > -1)
                        {
                            satir = sr.ReadLine();
                            flag = satir.Substring(11, 3);
                            switch (flag)
                            {
                                case "FIS":
                                    Line = new Main();
                                    Line.EvrakTipi = EvrakTipi.Fis;
                                    Line.KasaNo = ZeroRemoveStart(satir.Substring(15, 3));
                                    Line.KasiyerNo = ZeroRemoveStart(satir.Substring(23, 4));
                                    Line.FisNo = ZeroRemoveStart(satir.Substring(28, 6).Trim());
                                    Line.ZRapNo = ZeroRemoveStart(satir.Substring(36, 4));
                                    break;
                                case "GPS":
                                    Line = new Main();
                                    Line.EvrakTipi = EvrakTipi.Iade;
                                    Line.KasaNo = ZeroRemoveStart(satir.Substring(15, 3));
                                    Line.KasiyerNo = ZeroRemoveStart(satir.Substring(23, 4));
                                    Line.FisNo = ZeroRemoveStart(satir.Substring(28, 6).Trim());
                                    Line.ZRapNo = ZeroRemoveStart(satir.Substring(36, 4));
                                    break;
                                case "FAT":
                                    Line = new Main();
                                    Line.EvrakTipi = EvrakTipi.Fatura;
                                    Line.KasaNo = ZeroRemoveStart(satir.Substring(15, 3));
                                    Line.KasiyerNo = ZeroRemoveStart(satir.Substring(23, 4));
                                    Line.FaturaNo = ZeroRemoveStart(satir.Substring(28, 5).Trim());
                                    Line.FisNo = Line.FaturaNo;
                                    Line.ZRapNo = ZeroRemoveStart(satir.Substring(36, 4));
                                    break;
                                case "TAR":
                                    Line.Tarih = satir.Substring(15, 10).Trim().ToDateTime();
                                    Line.AyAdi = Line.Tarih.Month.AyAdi();
                                    Line.Saat = Cevir.Parse<int>(satir.Substring(28, 2));
                                    if (Lines.Count > 0)
                                    {
                                        Lines[Lines.Count - 1].BitisTarihi = Line.Tarih;
                                    }
                                    break;
                                case "SAT":
                                    Child child = new Child();
                                    child.SatirDurumu = Durumu.Satis;
                                    child.Adet = Cevir.Parse<decimal>(satir.Substring(15, 6).Replace('.', ','));
                                    child.PluNo = ZeroRemoveStart(satir.Substring(21, 6));
                                    child.KdvDeparmani = Cevir.Parse<int>(ZeroRemoveStart(satir.Substring(28, 2)));
                                    child.KdvDahilBurutTutar = Cevir.Parse<decimal>(satir.Substring(30, 10).Trim().Replace('.', ','));
                                    child.KdvTutari = Math.Round(child.KdvDahilBurutTutar - (child.KdvDahilBurutTutar / ((100m + GetKdvOran(child.KdvDeparmani)) / 100m)), 2);
                                    Line.KdvDahilBurutToplam += child.KdvDahilBurutTutar;
                                    Line.BurutKdvToplami += child.KdvTutari;
                                    Line.Childs.Add(child);
                                    break;
                                case "BKD":
                                    if (Line != null)
                                    {
                                        string barkod = (satir.Substring(15, 12) + satir.Substring(28, 8)).Trim();
                                        if (Line.Childs.Count > 0)
                                        {
                                            Line.Childs[Line.Childs.Count - 1].Barkod = barkod;
                                            if (_urunler.ContainsKey(barkod))
                                            {
                                                Line.Childs[Line.Childs.Count - 1].Product = _urunler[barkod];
                                            }
                                        }
                                    }
                                    break;
                                case "SNO":
                                    Line.Childs[Line.Childs.Count - 1].SeriNoBilgisi = (satir.Substring(15, 12) + satir.Substring(28, 12)).Trim();
                                    break;
                                case "GAL":
                                    Child ichild = new Child();
                                    ichild.Adet = Cevir.Parse<decimal>(satir.Substring(15, 6).Replace('.', ','));
                                    ichild.PluNo = ZeroRemoveStart(satir.Substring(21, 6));
                                    ichild.KdvDeparmani = Cevir.Parse<int>(ZeroRemoveStart(satir.Substring(28, 2)));
                                    ichild.KdvDahilBurutTutar = -1 * Cevir.Parse<decimal>(satir.Substring(30, 10).Trim().Replace('.', ','));
                                    ichild.KdvTutari = -1 * Math.Round(ichild.KdvDahilBurutTutar - (ichild.KdvDahilBurutTutar / ((100m + GetKdvOran(ichild.KdvDeparmani)) / 100m)), 2);

                                    Line.KdvDahilBurutToplam += ichild.KdvDahilBurutTutar;
                                    Line.BurutKdvToplami += ichild.KdvTutari;
                                    Line.Childs.Add(ichild);
                                    break;
                                case "IPT": //iptal işlemi
                                    Child pchild = new Child();
                                    pchild.SatirDurumu = Durumu.Iptal;
                                    pchild.Adet = Cevir.Parse<decimal>(satir.Substring(15, 6).Replace('.', ','));
                                    pchild.PluNo = ZeroRemoveStart(satir.Substring(21, 6));
                                    pchild.KdvDeparmani = Cevir.Parse<int>(ZeroRemoveStart(satir.Substring(28, 2)));
                                    pchild.KdvDahilBurutTutar = Cevir.Parse<decimal>(satir.Substring(30, 10).Trim().Replace('.', ','));
                                    pchild.KdvTutari = Math.Round(pchild.KdvDahilBurutTutar - (pchild.KdvDahilBurutTutar / ((100m + GetKdvOran(pchild.KdvDeparmani)) / 100m)), 2);

                                    Line.KdvDahilBurutToplam -= pchild.KdvDahilBurutTutar;
                                    Line.BurutKdvToplami -= pchild.KdvTutari;
                                    Line.Childs.Add(pchild);
                                    break;
                                case "IND": //indirim işlemi
                                    string indTutari = satir.Substring(30, 10).Trim().Replace('.', ',');
                                    if (string.IsNullOrEmpty(indTutari))
                                    {
                                        indTutari = "0";
                                    }
                                    if (satir.Substring(15, 3) == "TOP" || satir.Substring(15, 3) == "SNS")
                                    {
                                        Line.IndirimToplami = Cevir.Parse<decimal>(indTutari);
                                        Line.ToplamaYapilanIndirim = Line.IndirimToplami;
                                        decimal oran = 0;
                                        foreach (Child ch in Line.Childs)
                                        {
                                            oran = ch.KdvDahilBurutTutar * 100m / Line.KdvDahilBurutToplam;
                                            ch.IndirimToplami = Line.IndirimToplami * (oran / 100m);
                                        }
                                    }
                                    else if (satir.Substring(15, 3) == "URN")
                                    {
                                        Line.Childs[Line.Childs.Count - 1].IndirimToplami = Cevir.Parse<decimal>(indTutari);
                                        Line.UruneYapilanIndirim += Cevir.Parse<decimal>(indTutari);
                                    }
                                    break;
                                case "TOP":
                                    if (Line.EvrakTipi == EvrakTipi.Iade)
                                    {
                                        Line.KdvDahilNetToplam = -1 * Cevir.Parse<decimal>(satir.Substring(30, 10).Trim().Replace('.', ','));
                                    }
                                    else
                                        Line.KdvDahilNetToplam = Cevir.Parse<decimal>(satir.Substring(30, 10).Trim().Replace('.', ','));
                                    break;
                                case "NAK":
                                    if (Line.EvrakTipi == EvrakTipi.Iade)
                                        Line.NakitToplam = -1 * Cevir.Parse<decimal>(satir.Substring(30, 10).Trim().Replace('.', ','));
                                    else
                                        Line.NakitToplam = Cevir.Parse<decimal>(satir.Substring(30, 10).Trim().Replace('.', ','));
                                    break;
                                case "KRD":
                                    Line.KrediTusNo = satir.Substring(25, 2).Trim();
                                    Line.TaksitSayisi = satir.Substring(28, 2).Trim();
                                    if (Line.EvrakTipi == EvrakTipi.Iade)
                                        Line.KrediTusToplam = -1 * Cevir.Parse<decimal>(satir.Substring(30, 10).Trim().Replace('.', ','));
                                    else
                                        Line.KrediTusToplam = Cevir.Parse<decimal>(satir.Substring(30, 10).Trim().Replace('.', ','));
                                    break;
                                case "BNS":
                                    Line.PuanBilgisi = satir.Substring(30, 8).Trim();
                                    break;
                                case "STC":
                                    Line.SaticiKodu = satir.Substring(15, 4).Trim();
                                    break;
                                case "SON":
                                    Line.MusteriKodu = (satir.Substring(15, 12) + satir.Substring(28, 8)).Trim();
                                    if (string.IsNullOrEmpty(Line.MusteriKodu))
                                    {
                                        Line.MusteriKodu = "0";
                                    }
                                    Line.FaturaTipi = satir.Substring(38, 1).Trim();
                                    Line.AcikFatura = satir.Substring(39, 1).Trim();
                                    Lines.Add(Line);
                                    break;
                                default:
                                    break;
                            }
                        }
                        sr.Close();
                    }
                }
            }


            return Lines;
        }

        private string ZeroRemoveStart(string deger)
        {
            string sonuc = "";
            bool basla = false;
            foreach (Char c in deger.ToCharArray())
            {
                if (c != '0' && basla == false)
                {
                    basla = true;
                }

                if (basla)
                {
                    sonuc += c;
                }
            }
            return sonuc;
        }
        private string ZeroRemoveEnd(string deger)
        {
            string sonuc = "";
            bool basla = true;
            foreach (Char c in deger.ToCharArray())
            {
                if (c != '0' && basla == true)
                {
                    basla = false;
                }

                if (basla)
                {
                    sonuc += c;
                }
            }
            return sonuc;
        }
        private void LastWritePoint()
        {
            string fileName = Path + string.Format("POZ{0}{1}{2}.ini", DateTime.Now.Day.ToString("00"), DateTime.Now.Month.ToString("00"), DateTime.Now.Year.ToString("0000"));
            using (StreamWriter sw = new StreamWriter(fileName))
            {
                foreach (KeyValuePair<int, int> item in lastPoint)
                {
                    sw.WriteLine(string.Format("{0};{1}", item.Key, item.Value));
                }
                sw.Close();
            }
        }
        private void LastReadPoint()
        {
            string fileName = Path + string.Format("POZ{0}{1}{2}.ini", DateTime.Now.Day.ToString("00"), DateTime.Now.Month.ToString("00"), DateTime.Now.Year.ToString("0000"));
            if (File.Exists(fileName))
            {
                using (StreamReader sr = new StreamReader(fileName))
                {
                    string[] fields;
                    while (sr.Peek() > -1)
                    {
                        fields = sr.ReadLine().Split(';');
                        lastPoint.Add(int.Parse(fields[0]), int.Parse(fields[1]));
                    }
                    sr.Close();
                }
            }
        }
        private string[] getFileName(DateTime startDate, DateTime endDate)
        {
            List<string> _files = new List<string>();
            int days = Convert.ToInt32((endDate - startDate).TotalDays) + 1;
            for (int i = 0; i < days; i++)
            {
                _files.AddRange(Directory.GetFiles(this.Path + "\\POSGENEL", string.Format("HR{0}{1}{2}.*", startDate.AddDays(i).Day.ToString("00"), startDate.AddDays(i).Month.ToString("00"), startDate.AddDays(i).Year.ToString().Substring(2))));
            }
            List<string> remove = new List<string>();
            foreach (string fl in _files)
            {
                string txt = File.ReadAllText(fl);
                if (txt.IndexOf("TAR") == -1 && txt.IndexOf("MLC") == -1 && txt.IndexOf("VER") == -1)
                {
                    remove.Add(fl);
                }
            }
            foreach (string s in remove)
            {
                _files.Remove(s);
            }
            return _files.ToArray();
        }
        private string isnullSetZero(string deger)
        {
            if (string.IsNullOrEmpty(deger))
            {
                return "0";
            }
            else
            {
                return deger;
            }
        }
    }

    public enum EvrakTipi : byte
    {
        Fis = 0,
        Fatura = 1,
        Iade = 2
    }

    public enum Durumu : byte
    {
        Satis = 0,
        Iptal = 1
    }

    public class Main
    {
        public EvrakTipi EvrakTipi { get; set; }
        private List<Child> _childs = new List<Child>();
        public string KasaNo { get; set; }
        public string KasiyerNo { get; set; }
        public string FisNo { get; set; }
        public string FaturaNo { get; set; }
        public string AyAdi { get; set; }
        public DateTime Tarih { get; set; }
        public int Saat { get; set; }
        public DateTime BitisTarihi { get; set; }
        public string ZRapNo { get; set; }
        public decimal KdvDahilNetToplam { get; set; }
        public decimal KdvDahilBurutToplam { get; set; }
        public decimal BurutKdvToplami { get; set; }
        public decimal NakitToplam { get; set; }
        public decimal KrediTusToplam { get; set; }
        public string KrediTusNo { get; set; }
        public string TaksitSayisi { get; set; }
        public string MusteriKodu { get; set; }
        public string FaturaTipi { get; set; }
        public string AcikFatura { get; set; }
        public string SaticiKodu { get; set; }
        public string PuanBilgisi { get; set; }
        public decimal IndirimToplami { get; set; }
        public decimal ToplamaYapilanIndirim { get; set; }
        public decimal UruneYapilanIndirim { get; set; }
        public List<Child> Childs { get { return _childs; } }
    }

    public class Child
    {
        public Durumu SatirDurumu { get; set; }
        public decimal Adet { get; set; }
        public string PluNo { get; set; }
        public string Barkod { get; set; }
        public string SeriNoBilgisi { get; set; }
        public int KdvDeparmani { get; set; }
        public decimal KdvDahilBurutTutar { get; set; }
        public decimal KdvTutari { get; set; }
        public decimal IndirimToplami { get; set; }
        public Urun Product { get; set; }
    }

    public class Urun
    {
        public string Adi { get; set; }
        public string Kodu { get; set; }
        public int VergiOrani { get; set; }
        public int StokId { get; set; }
        public string Barkod { get; set; }
        public string AnaGrupAdi { get; set; }
        public string AltGrupAdi { get; set; }
        public string ReyonAdi { get; set; }
    }

    public class ZReport
    {
        public DateTime Tarih { get; set; }
        public int KasaNo { get; set; }
        public decimal FisCirosu { get; set; }
        public decimal FaturaCirosu { get; set; }
        public int FaturaSayisi { get; set; }
        public int FisSayisi { get; set; }
        public int IptalFisSayisi { get; set; }
        public decimal IptalFisTutari { get; set; }
        public int IptalFaturaSayisi { get; set; }
        public decimal FisNakitToplami { get; set; }
        public decimal FisKrediToplami { get; set; }
        public decimal FisIndirimToplami { get; set; }
        public decimal FisSatirIptalToplami { get; set; }
        public decimal FaturaNakitToplami { get; set; }
        public decimal FaturaKrediToplami { get; set; }
        public decimal FaturaKdvToplami { get; set; }
        public decimal GenelCiro { get; set; }
    }
}
